<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<%@page import="cn.bid.entity.User"%>
<html>
<head>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>在此处插入标题</title>
</head>
<body>
 <%
 //EL代替表达式
 	String str="We love java";
 	request.setAttribute("msg", "data in request");
 	pageContext.setAttribute("msg", "data in page");
 	session.setAttribute("msg", "data in session");
 	application.setAttribute("msg", "data in app");
 	String []ar={"戴一飞","朱峰","蒋成燕","夏晓芳"};
 	request.setAttribute("a", ar);
 	User u=new User();
 	u.setId(1000);
 	u.setUserName("laoliu");
 	u.setEnterdate(new java.util.Date());
 	request.setAttribute("user", u);
 	
 	session.setAttribute("a2", ar);
  %>
  <h1>
  	<%-- <%=str%> --%>
  	${msg},${a},${a[0]}
  </h1>
  <h1>
  	${user.id},${user['userName']}
  	----
  	${user.getId()}
  </h1>
  <h1>
   <!-- 完美的处理了null -->
   ==${title}**
  </h1>
  <hr size="49"/>
  msg in session:${sessionScope.msg}
  <br>
  ${sessionScope.a2[1]}
</body>
</html>